<?php
/**
 * Created by PhpStorm.
 * User: liuhong
 * Date: 2018/11/30
 * Time: 下午5:11
 */

namespace Api\Service;


class WithdrawService extends BaseService
{
    public $withdrawModel;

    public function __construct()
    {
        $this->withdrawModel=M('withdraw');
    }

    /**
     * 查询提现列表
     * @param $where
     * @param $page
     * @param int $pageNum
     * @param string $filed
     * @return mixed
     */
    public function queryList($where,$page,$pageNum=10,$filed=''){
       return $this->withdrawModel->field($filed)->page($page,$pageNum)->where($where)->select();
    }


    /**
     * 统计总数
     * @param $where
     * @return mixed
     */
    public function queryCount($where){
        return $this->withdrawModel->where($where)->count();
    }

    public function querySumMoney($where){
        return $this->withdrawModel->where($where)->sum('withdraw_money');
    }

}